<template>
    <div class="taskContent">
        <mt-header fixed title="知识档案" id="header2"></mt-header>
        <mt-navbar class="tab" v-model="checked">
            <mt-tab-item id="queryDa">档案查询</mt-tab-item>
            <mt-tab-item id="searchZsk">知识库搜索</mt-tab-item>
        </mt-navbar>
        <mt-tab-container v-model="checked">
          <mt-tab-container-item id="queryDa">
            <div class="dangan">档案查询</div>
            <el-form ref="form" :model="knowledgeForm" label-width="80px" id="renwu">
              <el-form-item label="任务系列号">
                <el-input v-model="knowledgeForm.taskSn" placeholder="任务系列号"></el-input>
              </el-form-item>
              <el-form-item label="任务类型">
                <el-select v-model="query1">
                  <el-option v-for="(item,index) in knowledgeForm.taskTypeResult" :key="index" :label="item.name" :value="item.code"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="海事局">
                <el-select v-model="query2" @change="selectMarine">
                  <el-option v-for="(item,index) in knowledgeForm.MarineBorad" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="雷达站">
                <el-select v-model="query3">
                    <el-option v-for="(item,index) in knowledgeForm.radarStation" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                  </el-select>
              </el-form-item>
              <el-form-item label="开始时间">
                <el-col>
                  <el-date-picker type="date" placeholder="yy-mm-dd" v-model="knowledgeForm.startDate" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
              <el-form-item label="结束时间">
                <el-col>
                  <el-date-picker type="date" placeholder="yy-mm-dd" v-model="knowledgeForm.endDate" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
                <el-form-item id="el_form">
                  <el-button type="primary" @click="getFileList">查询</el-button>
              </el-form-item>

            </el-form>
            <!-- 档案列表  结果 -->
            <div class="task">
                <p>档案列表</p>
                <div class="searchResult"></div>
                <el-collapse class="searchCollapse">
                  <el-collapse-item :title="item.marineBoardName+'---'+item.taskSn" v-for="(item,index) in searchList" :key="index" :name="index">
                    <div>任务系列号: {{item.taskSn}}</div>
                    <div>工作报告：{{item.reportSn}}</div>
                    <div>实施时间: {{item.jobDate}}</div>
                    <div>雷达站: {{item.radarStationName}}</div>
                    <div>报告类型: {{item.reportName}}</div>
                    <div>实施人: {{item.personName}}</div>
                    <div>审核人: {{item.gradeCreator}}</div>
                    <div>等级评价: {{item.taskGradeName}}</div>
                  </el-collapse-item>
                   <div class="page">
                        <el-button type="primary"  class="prev" :disabled="isDisabled" @click="prevPage"><i class="iconfont el-icon-arrow-left"></i>上一页</el-button>
                        <el-button type="primary"  class="next" :disabled="isDisabled1" @click="nextPage"><i class="iconfont el-icon-arrow-right"></i>下一页</el-button>
                    </div>
                </el-collapse>
            </div>
          </mt-tab-container-item>
          <mt-tab-container-item id="searchZsk">
             <!-- 知识库搜索 -->
            <el-form ref="form" :model="manageList" label-width="80px" id="renwu" style="margin-top:20px;">
              <el-form-item id="search">
                <el-input v-model="manageList.keywords" placeholder="知识库搜索">
                   <i
                    class="el-icon-search el-input__icon"
                    slot="suffix"
                    @click="searchContent"
                   >
                  </i>

                </el-input>
                <!-- <el-button type="primary" @click="searchContent">搜索</el-button> -->
              </el-form-item>
            </el-form>
            <div class="task">
                <p>搜索结果</p>
              <!-- <div class="searchResult"></div> -->
                <el-collapse>
                  <el-collapse-item v-for="(item,index) in searchResult" :key="index" :title="item.fileName" :name="index">
                    <div>创建人：{{item.creator}}</div>
                    <div>文件类型: {{item.type}}</div>
                    <div>关键字: {{item.searchKey}}</div>
                    <div>创建时间: {{item.createTime}}</div>
                    <div>文件路径：{{'http://vts.gzcttic.com:8000/'+item.path}}
                      <el-button icon="el-icon-download" @click="updown('http://vts.gzcttic.com:8000/'+item.path)">点击下载</el-button>
                      <!-- {{'http://vts.gzcttic.com:8000/'+item.path}} -->
                      </div>
                  </el-collapse-item>
                </el-collapse>
            </div>
          </mt-tab-container-item>
        </mt-tab-container>
          
         
    </div>
</template>

<script>
import knowledgeFile from "./js/knowledgeFile.js";
export default knowledgeFile;
</script>
<style scoped lang="scss">
@import "./scss/knowledgeFile.scss";
</style>
